<template>
  <j-modal
    :title="title"
    :width="1200"
    :visible="visible"
    :confirmLoading="confirmLoading"
    switchFullscreen
    @ok="handleOk"
    @cancel="handleCancel"
    :footer="false"
    cancelText="关闭"
  >
    <a-spin :spinning="confirmLoading">
      <a-descriptions>
        <a-descriptions-item label="文件名称">
          {{obj.fileName}}
        </a-descriptions-item>
        <a-descriptions-item label="文件后缀">
          {{obj.fileSuffix}}
        </a-descriptions-item>
        <a-descriptions-item label="文件夹名称">
          {{obj.folderName}}
        </a-descriptions-item>
        <a-descriptions-item label="项目名称">
          {{obj.projectName}}
        </a-descriptions-item>
        <a-descriptions-item label="资源名称">
          {{obj.resourceName}}
        </a-descriptions-item>
        <a-descriptions-item label="最后修改人">
          {{obj.lastModifier}}
        </a-descriptions-item>
        <a-descriptions-item label="下载次数">
          {{obj.downCount}}
        </a-descriptions-item>
        <a-descriptions-item label="文件大小">
          {{obj.fileSize}}
        </a-descriptions-item>
        <a-descriptions-item label="创建时间">
          {{obj.createdDate}}
        </a-descriptions-item>
        <a-descriptions-item label="文件物理路径">
          {{obj.filePath}}
        </a-descriptions-item>
      </a-descriptions>
    </a-spin>
  </j-modal>
</template>

<script>
import { httpAction,getAction } from '@/api/manage'
import moment from 'moment'

export default {
  name: 'BusTreviRiverPcModal',
  data() {
    return {
      title: '操作',
      visible: false,
      model: {},
      labelCol: {
        xs: { span: 24 },
        sm: { span: 5 }
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 }
      },

      confirmLoading: false,
      validatorRules: {
        userId: [{ required: true, message: '请输入用户id!' }]
      },
      url: {
        detail: '/resource/busResource/queryById'
      },
      validatorRules: {
        content: [{ required: true, message: '请输入评论' }]
      },
      obj:{}
    }
  },
  created() {
    
  },
  methods: {
    add() {
      //初始化默认值
      this.edit({})
    },
    edit(record) {
      console.log(record, 'record')
      this.obj = record
      this.model = Object.assign({}, record)
      this.visible = true
      const htturl = this.url.detail 
      const id = record
      const params = {
        id:id
      }
      // getAction(htturl,params).then((res)=>{
      //     this.obj = res.result
      // })
    },
    close() {
      this.$emit('close')
      this.visible = false
    },
    handleOk() {
      const that = this
      that.close()
    },
    handleCancel() {
      this.close()
    }
  }
}
</script>

<style lang="less" scoped></style>
